From 663934b2dcb3769e122e56adf1efcf333d3cee5c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 12 Oct 2020 16:39:35 -0400 Subject: [PATCH] atspi: Use gtk_accessible_should_present Replace explicit visibility check by this more general method of determining whether an accessible should be presented to the a11y layer. --- gtk/a11y/gtkatspicontext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index 27157feda2..72ca83c821 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -316,7 +316,7 @@ get_index_in_parent (GtkWidget *widget) child; child = gtk_widget_get_next_sibling (child)) { - if (!gtk_widget_get_visible (child)) + if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child))) continue; if (child == widget) @@ -425,7 +425,7 @@ handle_accessible_method (GDBusConnection *connection, child; child = gtk_widget_get_next_sibling (child)) { - if (!gtk_widget_get_visible (child)) + if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child))) continue; if (real_idx == idx) @@ -462,7 +462,7 @@ handle_accessible_method (GDBusConnection *connection, child; child = gtk_widget_get_next_sibling (child)) { - if (!gtk_widget_get_visible (child)) + if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child))) continue; GtkATContext *context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (child)); @@ -561,7 +561,7 @@ handle_accessible_get_property (GDBusConnection *connection, child; child = gtk_widget_get_next_sibling (child)) { - if (!gtk_widget_get_visible (child)) + if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child))) continue; n_children++; -- 2.30.2